package cn.com.bluemoon.daps.sync.core.sync.log;

import cn.com.bluemoon.daps.sync.core.sync.GlobalConfig;
import org.springframework.context.ApplicationEvent;

/**
 * 新增日志事件 (预发布、生产）
 *
 * @author Jarod.Kong
 * @date 2021/6/22 11:19
 */
public class SyncEnvProdLogEvent extends ApplicationEvent {
    private final EvenType type;
    private final GlobalConfig globalConfig;

    public SyncEnvProdLogEvent(SyncEnvProdLog source, EvenType type, GlobalConfig globalConfig) {
        super(source);
        this.type = type;
        this.globalConfig = globalConfig;
    }

    public EvenType getType() {
        return type;
    }

    public GlobalConfig getGlobalConfig() {
        return globalConfig;
    }

    /**
     * The object on which the Event initially occurred.
     *
     * @return The object on which the Event initially occurred.
     */
    @Override
    public SyncEnvProdLog getSource() {
        return (SyncEnvProdLog) super.getSource();
    }
}
